<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	    		xmlns:ui="http://java.sun.com/jsf/facelets"
	  			xmlns:h="http://java.sun.com/jsf/html"
	  			xmlns:f="http://java.sun.com/jsf/core"
	  			xmlns:sf="http://www.springframework.org/tags/faces"
				template="/WEB-INF/layouts/tableLayout.xhtml">

<ui:define name="content">
	<h:form id="columnsForm">
	    <span class="errors">
	       <h:messages globalOnly="true" />
	    </span>
	    	    
		<fieldset>
			<div class="field">
				<div class="label">
					<h:outputText value="#{flowScope.selectedTable.name}"/>
				</div>
				<div>
					<h:inputTextarea id="itTableComment" value="#{flowScope.selectedTable.comment}" styleClass="commentTextArea"/>						
				</div>
			</div>
		</fieldset>
		
		<h:dataTable id="dtColumns" styleClass="commentsTable" value="#{flowScope.selectedTable.columns}" var="tableColumn">
			<h:column>
				<f:facet name="header">#{msg.general_column}</f:facet>
				<h:outputText value="#{tableColumn.name}"/>						
			</h:column>
			<h:column>
				<f:facet name="header">#{msg.general_comment}</f:facet>
				<h:inputTextarea value="#{tableColumn.comment}" styleClass="commentTextArea"/>						
			</h:column>
		</h:dataTable>
		
		<div class="buttonGroup">
			<sf:commandButton id="cbBack" value="#{msg.general_backButton}" processIds="columnsForm" action="back" />
			<sf:commandButton id="cbSave" value="#{msg.general_saveButton}" processIds="columnsForm" action="save" />
		</div>
				
	</h:form>
</ui:define>
</ui:composition>